﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using MySystemMag.Models;
namespace MySystemMag.DAL
{
    public class TaxContext : DbContext
    {

        public TaxContext(DbContextOptions<TaxContext> options) : base(options)
        {

        }      
        public DbSet<User> User { get; set; }
        public DbSet<Role> Role { get; set; }
        public DbSet<Menu> Menu { get; set; }
        public DbSet<Office> Office { get; set; }
        public DbSet<RoleAuthorize> RoleAuthorize { get; set; }
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

            modelBuilder.Entity<Role>();
            modelBuilder.Entity<User>();
            modelBuilder.Entity<Menu>();
            modelBuilder.Entity<Office>();
        }
    }
}
